package com.carleasoft.mps.cms.business.train.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainExam;
import com.carleasoft.mps.cms.business.train.bean.entity.TrainScore;
import com.carleasoft.mps.cms.business.train.bean.po.*;
import com.carleasoft.mps.cms.business.train.bean.vo.*;
import com.carleasoft.mps.core.result.R;
import com.carleasoft.mps.data.mybatisplus.page.PageBase;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 考核主表 服务类
 * </p>
 *
 * @author fan
 * @since 2023-05-17
 */
public interface TrainExamService extends IService<TrainExam> {
    /**
     * 训练考核-增加
     */
    boolean add(TrainExamAddOrEditPo trainExamAddOrEditPo);
    /**
     * 训练考核-编辑
     */
    boolean edit(TrainExamAddOrEditPo trainExamAddOrEditPo);
    /**
     * 训练考核-删除
     */
    boolean delete(TrainExam trainExam);
    /**
     * 训练考核-分页查询
     */
    Page<TrainExamVo> pageQuery(TrainExamPageQueryPo trainExamPageQueryPo);
    /**
     * 训练考核-详情
     */
    TrainExamAddOrEditPo detail(TrainExam trainExam);

    /**
     * 训练考核-成绩登记-分页查询
     */
    Page<TrainScoreVo> registerPageQuery(RegisterPageQuery registerPageQuery);
    /**
     * 训练考核-成绩登记-详情
     */
    TrainScoreDetailVo registerDetail(TrainScore trainScore);
    /**
     * 训练考核-成绩登记-单个登记
     */
    boolean registerAddOne(TrainScorePo trainScorePo);
    /**
     * 训练考核-成绩登记-成绩导入
     */
    boolean registerImport(MultipartFile file,String examCode);

    /**
     * 训练考核-成绩登记-模板下载
     */
    boolean registerDownload(HttpServletResponse response);
    /**
     * 训练考核-成绩登记-模板解析
     */
    List<TrainScore> registerParse(MultipartFile file);
    /**
     * 训练考核-完成登记接口
     */
    boolean finish(TrainExamFinishPo trainExamFinishPo);

    boolean downloadScoreTemp(TrainExam trainExam ,HttpServletResponse response);

    List<TrainExamScorePo> parseCopy(MultipartFile file);
    /**
     * 训练考核-成绩登记-目标对象树
     */
    List<ClassTreeVo> classTree(TrainExam trainExam);

    /**
     * 训练考核情况查5条
     */
    Page<HashMap<String,String>> getTrainExam(GetTrainExamPo getTrainExamPo);
    /**
     * 根据考核编码统计考核
     */
    HashMap<String,Object> statisticsExam(TrainScore trainScore);
    /**
     * 根据考核编码成绩统计
     */
    HashMap<String,Object> statisticsGrades(@RequestBody TrainScore trainScore);
    List<StatisticsGradesVo> statisticsConsume(StatisticsConsumePo statisticsConsumePo);
    List<StatisticsGradesVo> statisticsConsumeOfOil(StatisticsConsumePo statisticsConsumePo);
    /**
     * 用车情况统计
     */
    HashMap<String,Object> statisticsByCar();
    /**
     * 全年概况统计
     */
    List<HashMap<String,Object>> statisticsByYear(StatisticsByYearPo statisticsByYearPo);


    List<TrainContentVo> contentImportExcel(MultipartFile file);

    List<ContentInfoVo> contentList(ContentListPo contentListPo);
}
